package com.ruoyi.project.system.newregister.service.impl;

import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.project.system.newregister.domain.NewRegister;
import com.ruoyi.project.system.newregister.mapper.NewRegisterMapper;
import com.ruoyi.project.system.newregister.service.INewRegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 新人注册配置Service业务层处理
 * 
 * @author LCL
 * @date 2021-01-20
 */
@Service
public class NewRegisterServiceImpl implements INewRegisterService 
{
    @Autowired
    private NewRegisterMapper newRegisterMapper;

    /**
     * 查询新人注册配置
     * 
     * @param id 新人注册配置ID
     * @return 新人注册配置
     */
    @Override
    public NewRegister selectNewRegisterById(String id)
    {
        return newRegisterMapper.selectNewRegisterById(id);
    }

    /**
     * 查询新人注册配置列表
     * 
     * @param newRegister 新人注册配置
     * @return 新人注册配置
     */
    @Override
    public List<NewRegister> selectNewRegisterList(NewRegister newRegister)
    {
        return newRegisterMapper.selectNewRegisterList(newRegister);
    }

    /**
     * 新增新人注册配置
     * 
     * @param newRegister 新人注册配置
     * @return 结果
     */
    @Override
    public int insertNewRegister(NewRegister newRegister)
    {
        return newRegisterMapper.insertNewRegister(newRegister);
    }

    /**
     * 修改新人注册配置
     * 
     * @param newRegister 新人注册配置
     * @return 结果
     */
    @Override
    public int updateNewRegister(NewRegister newRegister)
    {
        return newRegisterMapper.updateNewRegister(newRegister);
    }

    /**
     * 删除新人注册配置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteNewRegisterByIds(String ids)
    {
        return newRegisterMapper.deleteNewRegisterByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除新人注册配置信息
     * 
     * @param id 新人注册配置ID
     * @return 结果
     */
    @Override
    public int deleteNewRegisterById(String id)
    {
        return newRegisterMapper.deleteNewRegisterById(id);
    }

    @Override
    public List<NewRegister> findAll() {
        return newRegisterMapper.findAll();
    }
}
